using System;
using System.Collections.Generic;
using PetaPoco;

public interface IDatabase:  IDisposable
{
    string ConnectionString { get; }
    string ProviderName { get; }
    List<T> SelectList<T>(string comand, params object[] args);
    T Select<T>(string command, params object[] args) where T : class;
    object Insert(string tableName, object poco);
    int Update(string tableName, object poco);
    int Delete(string tableName, object poco);
    new T ExecuteScalar<T>(string sql, params object[] args);
    new int Execute(string sql, params object[] args);
    void BeginTransaction();
    void AbortTransaction();
    void CompleteTransaction();
    Page<T> SelectPage<T>(int pageIndex, int pageSize, string command, params object[] args);
}

public interface IValidate
{
    List<string> Validate(object poco);
}